﻿@model IEnumerable<xmgl.Models.Book>

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>图书列表-mvcbook</title>
</head>
<body>
    <p>
        @Html.ActionLink("创建", "/Create")
    </p>
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.BookName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Author)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Publisher)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Price)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Remark)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.BookName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Author)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Publisher)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Price)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Remark)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.BookID }) |
                    @Html.ActionLink("Details", "Details", new { id = item.BookID }) |
                    @Html.ActionLink("Delete", "Delete", new { id = item.BookID })
                </td>
            </tr>
        }

    </table>
</body>
</html>
